package api

import (
	"github.com/gin-gonic/gin"
	"swagger/api/handler"
)

func Router(r *gin.Engine) {
	apiGrpc := r.Group("/api")
	{
		user := apiGrpc.Group("/user")
		{
			user.POST("/register", handler.Register)   //注册
			user.GET("/list", handler.GetUserList)     //获取用户列表
			user.GET("/detail", handler.GetUserDetail) //获取用户详情
			user.PUT("/update", handler.UpdateUser)    //更新用户
			user.DELETE("/delete", handler.DeleteUser) //删除用户
		}
	}
}
